import  {xsEntity} from './base.entity';
import { Column ,Entity, ManyToOne} from 'typeorm';
import { ModelEntity } from './model.entity';

/**
 * 描述
 */
@Entity()
export class ItemEntity extends xsEntity {
  @Column({ comment: '类型' })
  type: number;
  @Column({ type: 'longtext', default:null })
  content: string;
  @Column({ comment: '封面', default:null  })
  cover: string;
  @Column({ comment: '作者' , default:null })
  author: string;
  @Column({ comment: '观看人数', default:null  })
  view: number;
  @Column({ comment: '标题' , default:null })
  title: string;
  @Column({ comment: '标题' , default:null })
  more: string;
  // @Column({ comment: '标题' , default:null })
  // Pid: number;
  @ManyToOne(() => ModelEntity, user => user.item)
  Pid: ModelEntity;
}
